home *** CD-ROM | disk | FTP | other *** search
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_RENAME_FILE
-
- creation {ANY}
- make
-
- feature {ANY}
-
- core1: STRING is "core1.tmp";
-
- core2: STRING is "core2.tmp";
-
- make is
- local
- std_fw: STD_FILE_WRITE;
- do
- if file_exists(core1) then
- remove_file(core1);
- end;
- is_true(not file_exists(core1));
- !!std_fw.connect_to(core1);
- std_fw.disconnect;
- is_true(file_exists(core1));
- rename_file(core1,core2);
- is_true(file_exists(core2));
- is_true(not file_exists(core1));
- remove_file(core2);
- is_true(not file_exists(core2));
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_RENAME_FILE: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- TEST_RENAME_FILE
-